<template>
  <view class="bg-white">
      <view class="h-40 flex flex-col justify-center items-center ">
        <view class="text-lg">+{{ detailInfo.pay_price }}</view>
        <!--<view class="text-xs">余额: {{ detailInfo.balance }}</view>-->
      </view>
      <view class="px-4">
        <view class="pb-4 border-bottom">
          <view class="flex justify-between pb-4">
            <view class="text-slate-600">订单号</view>
            <view class="text-slate-600">{{ detailInfo.order_id }}</view>
          </view>

          <view class="flex justify-between pb-4">
            <view class="text-slate-600">充值说明</view>
            <view class="text-slate-600">{{ detailInfo.mark || '用户充值' }}</view>
          </view>

          <view class="flex justify-between pb-4">
            <view class="text-slate-600">充值金额</view>
            <view class="text-slate-600">{{ detailInfo.pay_price }}元</view>
          </view>

        </view>

        <view class="pb-4">
            <view class="flex justify-between mt-5">
              <view class="text-slate-600">创建时间</view>
              <view class="text-slate-600">{{ detailInfo.add_time }}</view>
            </view>

            <view class="flex justify-between mt-5">
              <view class="text-slate-600">用户昵称</view>
              <view class="text-slate-600 flex items-center">
                <image class="w-5 h-5 rounded-full mr-2" :src="detailInfo.avatar"></image>
                {{ detailInfo.nickname }}
              </view>
            </view>

            <view class="flex justify-between mt-5">
              <view class="text-slate-600">用户ID</view>
              <view class="text-slate-600">{{ detailInfo.uid }}</view>
            </view>

            <!--<view class="flex justify-between mt-5">-->
            <!--  <view class="text-slate-600">充值来源</view>-->
            <!--  <view class="text-slate-600">{{ detailInfo.title }}</view>-->
            <!--</view>-->



        </view>
      </view>

  </view>
</template>

<script setup lang="ts">
    import { ref } from 'vue'
    import { userRevDetailApi } from '@/api/revenue'
    import { onLoad } from '@dcloudio/uni-app'

    onLoad((options) => {
      getInfo(options?.id)
    })

    /** 提现详情 **/
    const detailInfo = ref<any>({})
    const getInfo = async(id) => {
      // 17258
      const res = await userRevDetailApi(id)
      detailInfo.value = res.data[0]
    }
</script>

<style scoped lang="scss">
page {
  background: #f5f5f5;
}
</style>
